package com.yjt.fresh.api;

import android.app.Activity;

import com.wzgiceman.rxretrofitlibrary.retrofit_rx.Api.BaseApi;
import com.wzgiceman.rxretrofitlibrary.retrofit_rx.listener.HttpOnNextListener;
import com.yjt.fresh.httpservice.HttpPostService;

import java.util.Map;

import retrofit2.Retrofit;
import rx.Observable;

/**
 * 加入购物车
 * Created by mcc on 2018-07-30.
 */

public class ApiAddBuyCart extends BaseApi {
    private Map<String,Object> mMap;

    public Map<String, Object> getMap() {
        return mMap;
    }

    public void setMap(Map<String, Object> map) {
        mMap = map;
    }

    public ApiAddBuyCart(HttpOnNextListener listener, Activity rxAppCompatActivity, boolean showProgress, boolean cache, boolean cancel) {
        super(listener, rxAppCompatActivity, showProgress, cache, cancel);
    }

    @Override
    public Observable getObservable(Retrofit retrofit) {
        return retrofit.create(HttpPostService.class).addBuyCart(getMap());
    }
}
